Module Skills

Tuple Documentation of module_skills.py
Each skill contains the following fields:
1) Skill id (string): used for referencing skills in other files. The prefix skl_ is automatically added before each skill-id.
2) Skill name (string).
3) Skill flags (int). See header_skills.py for a list of available flags
4) Maximum level of the skill (int).
5) Skill description (string): used in character window for explaining the skills.

module_skills.py contains all the skills used by the module system. A skill grants an ability or buff to a character or a party. The level of the skill determines its potency. In Native each of a character's skills can be increased from level 0 to level 10 and there are 24 skills.

Each skill has a base attribute. A character's level of a skill cannot surpass one third of their level in its base attribute (except through the use of Books). For example, Tactics has Intelligence as its base attribute; if Intelligence is level 9, Tactics cannot surpass level 3. For players, initial skill levels are dictated by their character's background and may exceed this limitation.

The type of a skill determines how it affects the party. There are three types of skills:

  • Party skill: A party skill grants an ability to the party as a whole. The level of a party skill is chosen from the party member who has the highest level in that skill, regardless whether it is the player or a companion. If the player has a party skill trained to level 2 or higher, a bonus may be awarded (see below).
  • Leader skill Like a party skill, a leader skill grants an ability to a party. However, only the party-leader's level in the skill is used.
  • Personal skill A personal skill grants an ability to an individual party-leader or companion. In general this ability only benefits the individual. However, in the case of Trainer, the whole party benefits from bonus experience. Therefore multiple companions with Trainer can be used to give a greater advantage to the party.

If the player character has a sufficient level in a party skill, a bonus will be awarded, the so-called Party Skill Bonuses. If the party's highest skill is not from the player character, the member who has the highest level in that skill will determine the party skill base value, while the player character's level will grant level bonuses according to the table below.

Skill Level Level Bonus
0-1 (+0)
2-4 (+1)
5-7 (+2)
8-9 (+3)
10 (+4)

This means that party skills can obtain a maximum level of 14 when the player character is trained up to level 10. Once this level of skill is achieved, other members of the party with the same skill only serve a backup role in case the party leader falls below the health threshhold for their skills to be active.

Native Skills and Effects

Available Native Skills
1) Leadership (Leader skill): Every point increases maximum number of troops you can command by 5, increases your party morale and reduces troop wages by 5 %.
2) Prisoner Management (Leader skill): Every level of this skill increases maximum number of prisoners by 5.
7) Persuasion (Personal skill): This skill helps you make other people accept your point of view. It also lowers the minimum level of relationship needed to get NPCs to do what you want.
8) Engineer (Party skill): This skill allows you to construct siege equipment and fief improvements more efficiently.
9) First Aid (Party skill): Heroes regain 5 % per skill level of hit-points lost during mission.
10) Surgery (Party skill): Each point to this skill gives a 4 % chance that a mortally struck party member will be wounded rather than killed.
11) Wound Treatment (Party skill): Party healing speed is increased by 20 % per level of this skill.
12) Inventory Management (Leader skill): Increases inventory capacity by +6 per skill level.
13) Spotting (Party skill): Party seeing range is increased by 10 % per skill level.
14) Path-finding (Party skill): Party map speed is increased by 3 % per skill level.
15) Tactics (Party skill): Every two levels of this skill increases starting battle advantage by 1.
16) Tracking (Party skill): Tracks become more informative.
17) Trainer (Personal skill): Every day, each hero with this skill adds some experience to every other member of the party whose level is lower than his/hers. Experience gained goes as: {0,4,10,16,23,30,38,46,55,65,80}.
22) Looting (Party skill): This skill increases the amount of loot obtained by 10 % per skill level.
23) Horse Archery (Personal skill): Reduces damage and accuracy penalties for archery and throwing from horseback.
24) Riding (Personal skill): Enables you to ride horses of higher difficulty levels and increases your riding speed and manuever.
25) Athletics (Personal skill): Improves your running speed.
26) Shield (Personal skill): Reduces damage to shields (by 8 % per skill level) and improves shield speed and coverage.
27) Weapon Master (Personal skill): Makes it easier to learn weapon proficiencies and increases the proficiency limits. Limits go as: 60, 100, 140, 180, 220, 260, 300, 340, 380, 420.
33) Power Draw (Personal skill): Lets character use more powerful bows. Each point to this skill (up to four plus power-draw requirement of the bow) increases bow damage by 14 %.
34) Power Throw (Personal skill): Each point to this skill increases throwing damage by 10 %.
35) Power Strike (Personal skill): Each point to this skill increases melee damage by 8 %.
36) Ironflesh (Personal skill): Each point to this skill increases hit points by +2.

Hard-coded Skills

There exists a list of hard-coded skills which are (indexed, beginning with 0): Trade (0), Leadership (1), Prisoner Management (2), Engineer (8), First Aid (9), Surgery (10), Wound Treatment (11), Inventory Management (12), Spotting (13), Pathfinding (14), Tactics (15), Tracking (16), Trainer (17), Horse Archery (23), Riding (24), Athletics (25), Shield (26), Weapon Master (27), Power Draw (33), Power Throw (34), Power Strike (35), Ironflesh (36).

The effects of these skills can only be removed if the respective skill is disabled with sf_inactive flag.[1] If you want to add a new skill, use the reserved skills or use soft-coded skills.

Skill Flags

  • sf_base_att_str sets Strength as base attribute of this skill.
  • sf_base_att_agi sets Agility as base attribute of this skill.
  • sf_base_att_int sets Intelligence as base attribute of this skill.
  • sf_base_att_cha sets Charisma as base attribute of this skill.
  • sf_effects_party lets the skill grant an ability to the party as a whole.
  • sf_inactive disables a skill.

Maximum Skill Level

Skills are stored in 4 bits - that is to say, limited to 15 (it's higher for attributes). If you look properly at header_skills.py, you will see that every skill increment is a multiple of the first (which is a power of 16) - this is so that all possible skill combinations can be fit into a single field.[2] However, in Native the maximum skill level is at 10 since it is missing the definitions for the upper ones. You need to define them by yourself or make use of a more expanded version of the Module System.

Adding, Combining, Deleting and/or Editing Skills

You can add a new skill by using one of the 18 reserved skills of which you can edit the skill ID and name as you wish. Keep in mind that it is not possible to add more skills,[3] so you are restricted to 42 skills in total.

If you add a new skill you might get irritated by your character window in-game since the skill list is expanding and thus moving up, ending in a result like in the image below.

The easiest way to fix this is to remove some other skill but that is in most cases not something you would like to do. Although the character window is a hard-coded menu you have some possibilities to alter the panel itself. The background image is stored as mesh character_window in one of the CommonRes/core_*.brf files. You can create your own resource file declaring the same mesh with a different texture and it should override the default one. Or you can just copy the texture character_window.dds to your module's Textures folder and edit that one to your heart's content.

Once you have enough space on the background, you will need to edit the text and/or elements positioning. The coordinates for them are stored in the file game_variables.txt - they are annotated and should be easy to find. Just keep in mind that base x/y coordinates and container sizes are usually absolute (with screen having 1.0 * 0.75 dimension, no matter what aspect ratio it actually has), while element/text size values are usually relative (so width 2.0 doesn't mean "twice wider than screen" but "twice wider than element's mesh as measured by ruler in OpenBrf").[4]

You might want to combine, edit or delete some of the Native skills and ask yourself if that is possible. It depends, most skills have hard-coded effects while some other effects are defined in the Module System. Latter one can easily be edited. For the hard-coded ones you would need to reverse engineer the effects if possible and then apply your own effects. For example, the skills Spotting and Pathfinding can be simulated via the game scripts game_check_party_sees_party and game_get_party_speed_multiplier while Tracking is a skill which can not be simulated.[5] When checking for a skill effect you have three options:

  1. hard-coded stuff (will require extra work to override)
  2. hard-coded stuff but with open settings on module.ini (so just tweak the flag/variable there)
  3. Module System effect (open code)

Start by finding the reference (key). It is a skill, so go to module_skills.py. For skills you add skl_, so the code reference is skl_leadership for the key Leadership, etc. Now do a full text search for this on your Module System and check where it is getting used. To stay with the example, you would eventually find the script game_get_party_companion_limit that implements the logic around party size limit. Note also how the script name normally tells you what it is used for.[5]